package fr.enseirb.mycub.structures.bike;

import com.google.android.maps.GeoPoint;

import fr.enseirb.mycub.structures.Station;

/**
 * Model class which will represent a basic station
 * 
 * @author Eirbmove
 * 
 */

public class BikeStation extends Station {
	private int mBikes;
	private int mSlots;
	
	public static final String BIKES = "availableBikes";
	public static final String SLOTS = "freeSlots";
	
	public BikeStation(int id, String name,
			int longitude, int latitude, int availablesBikes,
			int freeLocations, boolean isOpen, boolean isFavorite, int distance) {
		super();
		super.mId = id;
		super.mName = name;
		setGeoPoint(new GeoPoint(latitude, longitude));
		mBikes = availablesBikes;
		mSlots = freeLocations;
		super.mIsOpen = isOpen;
		super.mIsFavorite = isFavorite;
		super.mDistance = distance;
	}

	
	public void setOpen(boolean isOpen) {
		if ((mIsOpen = isOpen) == false) {
			mSlots = 0;
			mBikes = 0;
		}
	}
	
	public int getBikes() {
		return mBikes;
	}

	public void setBikes(int bikes) {
		mBikes = bikes;
	}

	public int getSlots() {
		return mSlots;
	}

	public void setSlots(int slots) {
		mSlots = slots;
	}

	


}